#define laydate(x)
	<script src="/static/laydate/laydate.js"></script>	
	<script type="text/javascript"> 
		function _#(x.index??)_initlaydate(datevalue){
			var _elem="_#(x.index)";
			var _#(x.index??)_laydate = laydate.render({
			    elem: '#'+_elem,
			    type: "#(x.dateType??'datetime')",
			    format: '#(x.format??'yyyy-MM-dd HH:mm:ss')',
			    trigger: 'click',
			    change: function(value, date, endDate){
			    },
			});
			var format = _#(x.index??)_laydate.config.format;
			if(datevalue){
				var date = new Date(datevalue);
				datevalue = date.format(format);
				$("#_#(x.index??)").val(datevalue);
			}
			$("#_#(x.index??)").bind("focus",function(){
					var _name = $("#_#(x.index??)").attr("name").replace("token_", "");
					$("#_#(x.index??)").attr("name", _name);
					$("#form_token").val(1);
			 });
		}
	</script>	
	#setLocal(val = x.value??'')
	<input type="text"  id="_#(x.index??)" name="#(table??x.table).#(x.index??)"  data-type="laydate" class="form-control" #(x.required??) #(x.disabled??)  value="#(x.value??)" placeholder="请输入#(x.name??)" autocomplete="off" />
#end